<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>theme/${empty user.themeAddr ? 1 : user.themeAddr}/common.css"/>
	<script type="text/javascript" src="<%=basePath%>component/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/util.js"></script>
	<script type="text/javascript">
		var componentAddressBasePath = "component/dhtmlx3.5";
		var themeAddr = '${empty user.themeAddr ? 1 : user.themeAddr}';
		//函数：用来dhxmlt，获取外部样式的样式类型
		function getThemeAddrSuffix(){
			//dhtmlx默认样式模板名称
			var SuffixName = "skyblue";
			var names = themeAddr.split('&');
			if(names.length > 1){
				SuffixName = names[names.length - 1];
			}
			return SuffixName;
		}
		
		var power = {
			validatePower:function(){
				var powerInsertObjects = document.getElementsByName("powerInsert");
				var powerUpdateObjects = document.getElementsByName("powerUpdate");
				var powerDeleteObjects = document.getElementsByName("powerDelete");
				for ( var i = 0; i < powerInsertObjects.length; i++) 
					if (!this.getPowerInsert()) powerInsertObjects[i].style.display = 'none';
				for ( var i = 0; i < powerUpdateObjects.length; i++) 
					if (!this.getPowerUpdate()) powerUpdateObjects[i].style.display = 'none';
				for ( var i = 0; i < powerDeleteObjects.length; i++)
					if (!this.getPowerDelete()) powerDeleteObjects[i].style.display = 'none';
			},
			getPowerInsert:function(){
				return ('${power.powerInsert}' == 0)?false:true;
			},
			getPowerUpdate:function(){
				return ('${power.powerUpdate}' == 0)?false:true;
			},
			getPowerDelete:function(){
				return ('${power.powerDelete}' == 0)?false:true;
			},
			getPower:function(){
				var power = '';
				power += (('${power.powerInsert}' == 0)?'':(power == ''?'powerInsert':',powerInsert'));
				power += (('${power.powerUpdate}' == 0)?'':(power == ''?'powerUpdate':',powerUpdate'));
				power += (('${power.powerDelete}' == 0)?'':(power == ''?'powerDelete':',powerDelete'));
				return power;
			}
		};
	
		$(function(){
			power.validatePower();
		});
	</script>
	<script type="text/javascript" src="<%=basePath%>component/windows.js"></script>
  </head>
  <body>
  </body>
</html>